package com.manlitech.manlichat.enums;

public enum ResultEnums {
	
	/*成功返回*/
    SUCCESS(0, "成功"), 
    /*特殊异常*/
    UNKONW_ERROR(-1, "呀，服务器开小差了~"),

    //登录相关
    NO_AUTHTOKEN_VALUE(-2,"认证 accessToken 未传入") ,
    ERROR_ACCESSTOKEN_VALUE(-3,"认证 accessToken 不正确,请核对"),
    /* 异常相关 */
    UNKONW_REDIS_TYPE(1,"redis类型[单机,集群]未知"),
    UN_AUTH(2,"非法请求,未Auth认证,强制下线") ,
    SUCCESS_CHAT_TO_ONE_MESSAGE(3,"消息发送成功"),
    ERR_NO_PARAM_TYPE(4,"参数内容缺少type"),
    ERROR_GET_UNIQUEKEY(5,"uniqueKey 获取失败"),
    RECEIVE_IS_OFFLINE (6,"对方已下线咯,待她上线再查看咯") ,
    ERR_NO_MATCH_TYPE(7,"找不到匹配的 MessageHandler 处理器"),
    NOT_JSON_OBJECT(8,"入参格式错误,不是json字符串") ;
    private Integer code;

    private String msg;

    ResultEnums(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
